import React, { Component } from 'react';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import styles from './Finished.css';

class Finish extends Component {
    constructor(props) {
        super(props);
        this.state = {
            finish: false
        }
    }

    componentDidMount() {
        global.clock();
        this.props.dispatch({
            type: 'clock/change',
            payload: {
                visible: true
            }
        })
    }

    componentWillReceiveProps(){
        
    }

    render() {
        const { data } = this.props;
        return (
            <div>
                {
                    data.postDataResult === '0' ?
                        <div className={styles.result_true}><span>办卡成功！</span></div>
                        :
                        <div className={styles.result_false}><span>办卡失败！</span></div>
                }
            </div>
        )
    }
}
function mapStateToProps(state) {
    const data = state.cardProcess;
    return { data };
}
export default connect(mapStateToProps)(Finish);